Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text

Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base

Public Class MyWebDetailViewController
	Inherits DevExpress.ExpressApp.ViewController

	Public Sub New()
		MyBase.New()

		'This call is required by the Component Designer.
		InitializeComponent()
		RegisterActions(components) 

	End Sub
    Protected Sub SaveAndClose(ByVal e As SimpleActionExecuteEventArgs)
        Dim myView As View = View
        'MyBase.SaveAndClose(e)
        If (Not myView Is Nothing) AndAlso _
        ((CType(myView, DetailView)).ObjectTypeInfo.Type Is GetType(Contact)) Then
            myView.Close()
        End If
    End Sub


    Private Function SaveAction() As Object
        Throw New NotImplementedException
    End Function

End Class
